<!DOCTYPE html>

<html lang="en">

<head>

    {include file="public/meta" /}

    {include file="public/link" /}

</head>

<body data-type="index" class="theme-white">

<div class="am-g tpl-g">

    {include file="public/header" /}

    {include file="public/left" /}

    {include file="public/content_top" /}

    <ol class="am-breadcrumb">

        <li><a href="../home/index.html" class="am-icon-home">首页</a></li>

        <li><a href="#">参数管理</a></li>

        <li class="am-active">等级参数</li>
        <li><a href="level_add.html" >添加等级</a></li>
    </ol>
    

    <hr data-am-widget="divider" class="am-divider am-divider-default"/>

    <div class="widget-body widget-body-lg am-fr">

        <div class="am-scrollable-horizontal">

            <table class="{$table}">

                <thead>

                <tr>

                    <th>ID</th>

                    <th>等级名称</th>

                    <th>分成奖励</th>

                    <th>提成奖励</th>

                    <th>购买升级条件</th>

                    <th>算力升级条件</th>

                    <th>操作</th>

                </tr>

                </thead>

                <tbody id="list">

                {foreach $list as $val}

                <tr class="text-c">

                    <td>{$val['id']}</td>

                    <td>{$val['name']}</td>

                    <td>{$val['fencheng']}</td>

                    <td>{$val['ticheng']}</td>

                    <td>{$val['buytj']}</td>

                    <td>{$val['suanli']}</td>

                    <td>
                        <!--<a href="#" onclick="return del(id={$val['id']});" class="am-btn am-btn-warning am-btn-xs">删除</a>-->
                        <a href="level_edit.html?id={$val['id']}"  class="am-btn am-btn-success am-btn-xs">修改</a>
                    </td>

                </tr>

                {/foreach}


                </tbody>

            </table>

            <div class="am-pagination-left">{$page}</div>

        </div>

    </div>

</div>

</div>
<!-- user_edit.html?id={$val['id']} -->
{include file="public/foot" /}

<script type="text/javascript">
    
    $(function () {

        var nav = $('.left-sidebar li.sidebar-nav-link');

        nav.removeClass("active");
        nav.eq({$a}).find('ul').show();
        nav.eq({$a}).find('ul li').eq({$b}).find('a').addClass('active');

    });
    function del(id)
    {
        if(confirm("确定要删除吗？"))
        {
            $.ajax({
                url: "{:url('System/del')}",
                type: "post",
                data: {id: id},
                success: function (r) {
                    if (r['code'] == 1) {
                        alert_open(r['msg'])
                    } else {
                        alert_msg(r['msg']);
                    }
                }
            });
            return true;
        }else{
            return false;
        }
        
        
    }

</script>

</body>

</html>